From: Owen W. Taylor Date: Wed, 16 Feb 2011 20:17:46 +0000 (-0500) Subject: panel: fix app menu visibility after quick overview visit X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8971 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=43961aaca517f6d5dcd8816b7055f44ce17602cb;p=gnome-shell.git panel: fix app menu visibility after quick overview visit If you left the overview immediately after entering it (either intentionally or due to a bug), the app menu would mistakenly end up hidden due to flaky interaction between its show() and hide() methods. Based on a patch by Dan Winship https://bugzilla.gnome.org/show_bug.cgi?id=641117 --- diff --git a/js/ui/panel.js b/js/ui/panel.js index 1c32e8619..f1a5e9097 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -220,7 +220,7 @@ AppMenuButton.prototype = { this._visible = !Main.overview.visible; if (!this._visible) - this.hide(); + this.actor.hide(); Main.overview.connect('hiding', Lang.bind(this, function () { this.show(); })); @@ -255,28 +255,27 @@ AppMenuButton.prototype = { if (this._visible) return; + this._visible = true; this.actor.show(); + Tweener.removeTweens(this.actor); Tweener.addTween(this.actor, { opacity: 255, time: Overview.ANIMATION_TIME, - transition: 'easeOutQuad', - onComplete: function() { - this._visible = true; - }, - onCompleteScope: this }); + transition: 'easeOutQuad' }); }, hide: function() { if (!this._visible) return; + this._visible = false; + Tweener.removeTweens(this.actor); Tweener.addTween(this.actor, { opacity: 0, time: Overview.ANIMATION_TIME, transition: 'easeOutQuad', onComplete: function() { this.actor.hide(); - this._visible = false; }, onCompleteScope: this }); },